using System;
using System.IO;
using System.Collections.Generic;
using System.Text;

namespace codegen.utility
{
    public class TextFile
    {
        public static string Read(string FileName)
        {
            string result = string.Empty;
            using (TextReader tr = new StreamReader(FileName))
            {
                result = tr.ReadToEnd();
                tr.Close();
            }
            return result;
            
        }
        public static void Write(string FileName,string text)
        { 
            using (TextWriter tw = new StreamWriter(FileName ))
            {
                tw.Write(text);
                tw.Flush();
                tw.Close();
            }
        }
    }
}
